class Product(object):
    def __init__(self, name):  # 初始化方法
        self.name = name

    def __str__(self):
        return '产品名称是:' + self.name

    def __add__(self, other):
        return self.name + '---' + other.name

    def __eq__(self, other):
        return self.name == other.name


p1 = Product('苹果1')
print(str(p1))

p2 = Product('苹果2')
print(p1 + p2)
print(p1 == p2)
